﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InsumoListForm.aspx.cs" 
Inherits="UILGestion.Admin.Insumo.InsumoListForm" %>
<%@ Register Assembly="CustomControls" Namespace="CustomControls" TagPrefix="cc2" %>


<%@ Register src="../../Control/menuCtrl.ascx" tagname="menuCtrl" tagprefix="uc1" %>
<%@ Register Assembly="ExtAspNet" Namespace="ExtAspNet" TagPrefix="ext" %>
<%@ Register assembly="WebLib" namespace="WebLib" tagprefix="cc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register src="InsumoListGrid.ascx" tagname="InsumoListGrid" tagprefix="uc2" %>
<%--needed for WebMethods--%>
<%@ Import Namespace="System.Web.Script.Services" %>
<%@ Import Namespace="System.Web.Services" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <link href="../../css/main.css" rel="stylesheet" type="text/css" />
    <link href="../../resources/css/main.css" rel="stylesheet" type="text/css" />
    
    <link rel="stylesheet" type="text/css" href="../../estilos/_common/styles/fonts.css" />
 <link rel="stylesheet" type="text/css" href="../../estilos/_common/styles/global.css" />
 <link rel="stylesheet" type="text/css" href="../../estilos/_common/styles/theme.css" />

  <script type="text/javascript">
      function Select(inp, data) {
          inp.value = data[1];
      };
    
    </script>
</head>
<body >

   
     <form id="form1" runat="server" >
    <asp:toolkitscriptmanager ID="ToolkitScriptManager1" runat="server"
     EnableScriptGlobalization="true"  EnablePartialRendering="true" />

    
     <uc1:menuCtrl ID="menuCtrl1" runat="server" />
    
    <asp:Panel ID="Panel2" runat="server"
  CssClass="Heading secTitle AreaHeading ms-crm-List-Header">
  <asp:Label ID="Label2" runat="server" Text="LISTAS INSUMOS" style="font-size: large; color: #960818">
  </asp:Label>
 </asp:Panel>
  
 <asp:Panel ID="PanelButtom" runat="server"
  BackColor="white">
     

      

        <table  >
            <tr>
                <td align="right" valign="top" width="100px">
                    Insumo:</td>
                <td width="400px">
                    <cc2:DropDownCC ID="insumoDDL" runat="server" Width="300px"  
                      DataTextField="descripcion" DataValueField="idInternal" AutoPostBack="true"></cc2:DropDownCC>
                </td>
                <td width="400px">
                    &nbsp;</td>
            </tr>
       


            <tr>
                <td align="right" valign="top" width="100px">
                    Descripcion:</td>
                <td width="450px" valign="top">
                    <cc1:Input ID="descripcionTextBox" runat="server" Width="300px"  DataType="List"
                     backcolor="#DFE8F6"  
                     method="GetRecursos" 
                     AutoPostBack="true" OnSelect="Select"   ></cc1:Input>
                
                </td>
               
               
                <td valign="top" width="450px">
                   

                    &nbsp;</td>
               
               
            </tr>





            <tr>
            <td colspan="2">
             <asp:UpdateProgress ID="UpdateProgress1" runat="server">
                    <ProgressTemplate>
                        <img src="../../App_Resources/images/loader-life.gif" alt="Loading Data" />
                    </ProgressTemplate>
                </asp:UpdateProgress>
            </td>
                <td>
                    <asp:Button ID="refreshButton"  Width="100px" runat="server" CssClass="ms-crm-List-Header" 
                        onclick="actualizarButton_Click" Text="Buscar" />
                    <asp:Button ID="nuevoButton" runat="server" Width="100px" CssClass="ms-crm-List-Header" 
                        onclick="nuevoButton_Click" Text="Nuevo" />
                </td>
            </tr>
           
        </table>




        <hr />
      
 <input id="idObra" name="idObra" type="hidden" runat="server" />
     <input id="findNivel" name="findNivel" type="hidden" runat="server" />
     <input id="findValor" name="findValor" type="hidden" runat="server" />
     <input id="findIdValor" name="findIdvalor" type="hidden" runat="server" />
      
   
     <asp:UpdatePanel ID="InsumoUpdatePanel" runat="server" UpdateMode="Conditional">
     <ContentTemplate>
     
    <uc2:InsumoListGrid ID="InsumoListGrid1" runat="server"  DataSourceID="InsumoDOS" /> 
     <asp:ObjectDataSource ID="InsumoDOS" runat="server" EnablePaging="True" 
        SelectCountMethod="Count" SelectMethod="GetInsumoList" SortParameterName="sortExpression"
        TypeName="BOL.InsumoBL" >
         <SelectParameters>
            <asp:ControlParameter Name="idInsumoList" ControlID="insumoDDL"    PropertyName="SelectedValue"/>
            <asp:ControlParameter Name="descripion"   ControlID="descripcionTextBox"    PropertyName="Text"/>
            <asp:Parameter Name="startRowIndex" Type="Int32" />
            <asp:Parameter Name="maximumRows" Type="Int32" />
            <asp:Parameter Name="sortExpression" Type="String" />
        </SelectParameters>


     </asp:ObjectDataSource>

     </ContentTemplate>
     <Triggers>
     <asp:AsyncPostBackTrigger  ControlID="insumoDDL"/>
     <asp:AsyncPostBackTrigger  ControlID="descripcionTextBox"/>

     <asp:AsyncPostBackTrigger  ControlID="refreshButton" />
     </Triggers>
     </asp:UpdatePanel>

        
 </asp:Panel>
    
    </form>




</body>
</html>
